PROJECT SUMMARY. New advances in calcium imaging make it possible to survey the brains of behaving animals at single-neuron resolution, thereby promising to transform the ?eld of neuroscience. However, existing statistical models and methods are inadequate for this complex and noisy data. This proposal involves developing statistical models and methods for the analysis of calcium imaging data. Aim 1 involves deconvolving a neuron's ?uorescence trace in order to infer its underlying spike times. A number of authors have considered a simple auto-regressive model for the effect of a neuron's spike on calcium dynamics, which leads naturally to a non-convex optimization problem previously thought to be computationally intractable. A scalable online algorithm will be developed for solving this non-convex optimization problem, leading to drastic improvements over competing approaches. This approach will be extended to perform spike deconvolution while allowing for the effect of a neuron's spike on calcium dynamics to take a completely non-parametric form. Existing approaches for quantifying the association between a neuron's activity and covariates of interest assume that it is governed by a single model, which applies across all trials. However, this assumption appears not to hold for calcium imaging data, which is characterized by a huge amount of heterogeneity in a single neuron's activity (and association with covariates) across trials. Aim 2 involves developing a mixture model for the association between a neuron's activity and covariates of interest, which can adequately capture real-world heterogeneity across trials. Researchers typically ?t a separate model for each neuron in order to quantify the association between that neu- ron's activity and the covariates of interest. Aim 3 involves ?borrowing strength? across a population of ? neurons, by assuming that each neuron in the population follows one of L response models, where L ? ?. The neurons associ- ated with a given response model can be viewed as a ?functional cell type?; thus, this approach will lead not only to the identi?cation of functional cell types, but also to more accurate estimation of the model that governs each neuron's ?ring rate, and a more re?ned understanding of neural dynamics. Finally, Aim 4 involves the development of high-quality open source software implementing the models and methods developed in this proposal, as well as plans for the careful evaluation of these tools by two end-users: a theorist and an experimentalist. The models and methods developed in this proposal are motivated by, and will be applied to, data from the Allen Brain Observatory, a large-scale publicly-available repository of calcium imaging data from the visual cortex of mice that were exposed to ?ve types of visual stimuli. The investigators will create high-quality publicly-available software that implements the models and methods developed in this proposal. All tools (models, methods, and software) developed in this proposal will be evaluated in collaboration with end-users.